<div>
    <h2>Cars</h2>
    <jhi-alert></jhi-alert>
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-4 no-padding-left">
                <button class="btn btn-primary" ui-sref="car.new" >
                    <span class="glyphicon glyphicon-plus"></span>
                    <span >
                        Create new Car
                    </span>
                </button>
            </div>
        </div>
    </div>
    <br/>
    <div class="table-responsive">
        <table class="jh-table table table-striped">
            <thead>
                <tr jh-sort="vm.predicate" ascending="vm.reverse" callback="vm.reset()">
                    <th jh-sort-by="id"><span>ID</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="make"><span>Make</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="brand"><span>Brand</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="price"><span>Price</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th></th>
                </tr>
            </thead>
            <tbody infinite-scroll="vm.loadPage(vm.page + 1)" infinite-scroll-disabled="vm.page >= vm.links['last']">
                <tr ng-repeat="car in vm.cars track by car.id">
                    <td><a ui-sref="car-detail({id:car.id})">{{car.id}}</a></td>
                    <td>{{car.make}}</td>
                    <td>{{car.brand}}</td>
                    <td>{{car.price}}</td>
                    <td class="text-right">
                        <div class="btn-group flex-btn-group-container">
                            <button type="submit"
                                    ui-sref="car-detail({id:car.id})"
                                    class="btn btn-info btn-sm">
                                <span class="glyphicon glyphicon-eye-open"></span>
                                <span class="hidden-sm-down"></span>
                            </button>
                            <button type="submit"
                                    ui-sref="car.edit({id:car.id})"
                                    class="btn btn-primary btn-sm">
                                <span class="glyphicon glyphicon-pencil"></span>
                                <span class="hidden-sm-down"></span>
                            </button>
                            <button type="submit"
                                    ui-sref="car.delete({id:car.id})"
                                    class="btn btn-danger btn-sm">
                                <span class="glyphicon glyphicon-remove-circle"></span>
                                <span class="hidden-sm-down"></span>
                            </button>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
